﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Rated.Website.Models;

namespace Rated.Website.Controllers
{
    public class RatedItemController : Controller
    {
        //
        // GET: /RatedItem/
        public ActionResult Index()
        {
            return View();
        }

        [HttpPost]
        public ActionResult UpdateDescription()
        {
            RatedItemViewModel.UpdateDescription(Request.Form);
            return null;
        }

        [HttpPost]
        public ActionResult UpdateLocation()
        {
            var model = RatedItemViewModel.UpdateLocation(Request.Form);
            return PartialView("Location", model);
        }

        [HttpPost]
        public ActionResult UpdateAttribute()
        {
            var model = RatedItemViewModel.UpdateAttribute(Request.Form);
            return null;
        }
    }
}
